import { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/index.vue";
import { DashboardIcon } from "@/components/Icon";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/dashboard",
    name: "Dashboard",
    component: Layout,
    redirect: "/dashboard/index",
    meta: {
      title: "工作台",
      sort: 0,
      icon: DashboardIcon,
    },
    children: [
      {
        path: "/dashboard/index",
        name: "DashboardIndex",
        component: () => import("@/views/dashboard/index.vue"),
        meta: {
          title: "工作台",
          affix: true,
          hideBreadcrumb: true,
        },
      },
    ],
  },
];

export default routes;
